from .events import *
from .request_type import *

event_handles = {
    # 注册请求
    PAYLOAD_REQ_FR_MCU_REGITSTER: RegisterDevicesEventHandle(),
    # 心跳
    PAYLOAD_REQ_FR_MCU_HEART_BEAT: Heartbeat(),
    # 读取配置项
    PAYLOAD_REQ_TO_MCU_GET_CLASS: ReadConfigItemHandle(),
    # 读取单个配置
    PAYLOAD_REQ_TO_MCU_GET_PARAM: ReadConfigEventHandle(),
    # 更改配置
    PAYLOAD_REQ_TO_MCU_SET_PARAM: WriteConfigItemHandle(),
    # 设置网路请求
    PAYLOAD_REQ_FR_MCU_START_REPORT_HIS_DATA: SettingNetWorkEventHandle(),
    # 数据自动上报
    PAYLOAD_REQ_FR_MCU_UP_REPORT: SensorDataEventHandle(),
    # 更改配置
    PAYLOAD_REQ_TO_MCU_SET_PARAM: WriteConfigItemHandle(),
    # 读取全部配置
    PAYLOAD_REQ_READ_ALL_CONFIG: LoadALLConfig(),
    # 重启设备
    PAYLOAD_REQ_REBOOT: ReBootEventHandle(),
    # 开启设备自动上传
    PAYLOAD_REQ_TO_MCU_ENABLE_UP_REPORT: AutoUploadHandle(),
    # 继电器状态
    PAYLOAD_REQ_TO_MCU_GET_INPUT: ReadControlStatusHandle(),
    #修改继电器状态
    PAYLOAD_REQ_TO_MCU_SET_OUTPUT: UpdateControlStatusHandle(),
    # 关闭连接
    CLEAN_TCP_CONNECT: CloseConnHandle(),
    # 透传指令
    PAYLOAD_REQ_TO_MCU_DOWN_TRANS: TransmissionEventHandle(),
    # 自动规则指令
    PAYLOAD_REQ_TO_MCU_SET_AUTO_RULE: AutoRuleActionsEventHandle(),

}
